#include "DirectedGameEvent.h"


DirectedGameEvent::DirectedGameEvent(GameObject* receiver, GameEvent* gameEvent): receiverObject(receiver), receiverEvent(gameEvent)
{
}

DirectedGameEvent::DirectedGameEvent(const DirectedGameEvent& rhs): receiverObject(rhs.receiverObject), receiverEvent(rhs.receiverEvent)
{
}

DirectedGameEvent::~DirectedGameEvent()
{
}

GameObject* DirectedGameEvent::Receiver() const
{
	return receiverObject;
}

GameEvent* DirectedGameEvent::Event() const
{
	return receiverEvent;
}

void DirectedGameEvent::Activate()
{
	if (receiverObject && receiverEvent)
		receiverObject->HandleEvent(receiverEvent);
}
